// pages/components/home/detailshow/detailshow.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
      id:{
          type:"String"
      },
      name: {
          type: "String"
      },
      initiator: {
          type: "String"
      },
      image: {
          type: "String"
      },
      time: {
          type: "String"
      },
      tid:{
          type:'String'
      }
  },
  /**
   * 组件的初始数据
   */
  data: {
      isShow:true,
      arrow:'icon-jiantoushang',
      h:590
  },
  /**
   * 组件的方法列表
   */
  methods: {
    slideToggle:function(){
        if(this.data.isShow){
            this.setData({
                isShow:false,
                arrow:'icon-jiantouxia',
                h: 0
            })
            this.triggerEvent('resetview', {
                value: true
            })
        }else{
            this.setData({
                isShow: true,
                arrow: 'icon-jiantoushang',
                h: 590
            })
            this.triggerEvent('resetview', {
                value: false
            })
        }
    },
    openfilepage:function(){
        if(this.data.tid != "" && this.data.tid != undefined && this.data.tid != null) {
            wx.navigateTo({
                url: '../../itemfile/itemfile?id=' + this.data.tid,
            })
        }
    }
  }
})
